home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
tools
/
sharp
/
sxwork2.lzh
/
サンプル基礎編
/
サブウィンドウ
/
SUBWIN.H
< prev
next >
Wrap
Text File
|
1994-03-10
|
2KB
|
76 lines
/******************************************************************************
* subwin.h: サブウィンドウ.x用ヘッダファイル
******************************************************************************
* Workroom SX-68K Sample Program Copyright 1994 SHARP
*
* 定数定義
*/
/* ウィンドウタイトル */
#define WINTITLE ((_LASCII) "\x14サブウィンドウの作成")
/* ウィンドウサイズ */
#define WIN_H 200 /* ウィンドウの幅 */
#define WIN_V 60 /* ウィンドウの高さ */
/* サブウィンドウサイズ */
#define SUBWIN_H 150 /* ウィンドウの幅 */
#define SUBWIN_V 50 /* ウィンドウの高さ */
/* 文字ボタンの表示位置 */
#define CHR_X 130 /* X座標 */
#define CHR_Y 30 /* Y座標 */
/* サブウィンドウのクローズボタンの位置 */
#define CLOSE_X (SUBWIN_H - 14) /* X座標 */
#define CLOSE_Y 4 /* Y座標 */
/* サブウィンドウのパートコード */
#define WS_ININSIDE 3 /* サブウィンドウの内側 */
#define WS_INDRAG 4 /* ドラッグリージョン */
#define WS_INCLOSE 7 /* クローズボタン */
/* イベントマスク */
#define EVENTMASK (EM_MSLDOWN | EM_UPDATE | EM_ACTIVATE | EM_SYSTEM1 | EM_SYSTEM2)
/*
* 構造体宣言
*/
typedef struct ComVal { /* 共通変数 */
Window *windowPtr; /* ウィンドウポインタ */
BOOLEAN activeFlag; /* アクティブフラグ */
TsEvent event; /* イベントレコード */
int eventMask; /* イベントマスク */
int errorCode; /* エラーコード */
BOOLEAN endFlag; /* 終了フラグ */
Control **chrBtnHdl; /* 文字ボタンのコントロールハンドル */
Subwin *subwinPtr; /* サブウィンドウポインタ */
Region **subRgnHdl; /* サブウィンドウのリージョンハンドル */
BOOLEAN subActiveFlag; /* サブウィンドウのアクティブフラグ */
} ComVal;
/*
* 関数プロトタイプ
*/
/* sbmain.c */
BOOLEAN init(ComVal *);
BOOLEAN createWindow(ComVal *);
BOOLEAN createControl(ComVal *);
void msLDownEvent(ComVal *);
void checkControl(ComVal *);
void keyDownEvent(ComVal *);
void updateEvent(ComVal *);
void drawGraph(ComVal *);
void activateEvent(ComVal *);
void systemEvent(ComVal *);
void showErrDialog(ComVal *);
void endProc(int, ComVal *);
/* subwin.c */
BOOLEAN createSubwin(ComVal *);
BOOLEAN openSubwin(ComVal *);
void closeSubwin(ComVal *);
int msLDownSubwin(ComVal *);
void dragSubwin(ComVal *, LPoint);
void drawSubwin(ComVal *);
void drawSubTitleBar(ComVal *);
BOOLEAN checkPctBtn(ComVal *, Rect *, LPoint);
void revFillRect(Rect *);